import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/AddFood',
      name: 'Add',
      component: () => import('../views/Food/AddFood.vue'),
    },
    {
      path: '/',
      name: 'GetFood',
      component: () => import('../views/Food/GetFood.vue'),
    },
    {
      path: '/AddKangFu',
      name: 'AddKangFu',
      component: () => import('../views/KangFu/AddKangFu.vue'),
    },
    {
      path: '/GetKangFu',
      name: 'GetKangFu',
      component: () => import('../views/KangFu/GetKangFu.vue'),
    },
    {
      path: '/UpDate',
      name: 'UpDate',
      component: () => import('../views/KangFu/UpDate.vue'),
    },
  ],
})

export default router
